﻿if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[RemindersQueueItemUpdate]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].RemindersQueueItemUpdate
GO
                  
CREATE PROCEDURE dbo.RemindersQueueItemUpdate
(
	@RemindersQueueItemID int,
	@ProcessingAttempts int,
	@Completed bit,
	@HasErrors bit,
	@Errors nvarchar(3000),
	@Modified datetime
)
AS

SET NOCOUNT ON

UPDATE
	dbo.RemindersQueueItem
SET
	ProcessingAttempts = @ProcessingAttempts,
	Completed = @Completed,
	HasErrors = @HasErrors,
	Errors = @Errors,
	Modified = @Modified
WHERE
	RemindersQueueItemID = @RemindersQueueItemID
GO    